package com.share.mapper;

import com.share.domain.Role;
import com.share.domain.User;
import org.apache.ibatis.annotations.Select;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.stereotype.Repository;

/**
 * caifan 2018/6/1
 */
@MapperScan
@Repository
public interface RoleMapper {
    /**
     * 根据角色id查询角色
     */
    @Select("select * from role where id = #{id}")
    public User findById(Long id);

    /**
     * 查询所有的用户
     */
  /*  @Select("select * from user")
    public List<User> findAllUser();*/

  public void insertRole(Role role);
}
